package com.acminds.acuteauto.persistence.entities;

// Generated Mar 3, 2012 9:48:22 AM by Hibernate Tools 3.4.0.CR1

import java.math.BigDecimal;
import java.util.Date;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.CascadeType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;
import javax.persistence.OneToMany;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.acminds.acuteauto.persistence.dto.*;

/**
 * Vehicle generated by customhbm2java
 */
@MappedSuperclass
public abstract class AbstractVehicle extends
		com.acminds.acuteauto.persistence.BaseDTO implements
		java.io.Serializable {

	private static final long serialVersionUID = 1L;

	private Integer vehicleId;
	private Style style;
	private Make make;
	private Model model;
	private UserInfo userInfo;
	private String stockNbr;
	private String description;
	private int year;
	private String engine;
	private Integer transType;
	private Integer drvTrnType;
	private Integer fuelType;
	private String vin;
	private Integer mileage;
	private BigDecimal dealerPrice;
	private BigDecimal salePrice;
	private BigDecimal specialPrice;
	private String colorExt;
	private String colorInt;
	private Integer warrantyType;
	private Integer warrantyTerm;
	private Integer warrantyMiles;
	private int status;
	private int vehCondition;
	private String carfaxApprvUrl;
	private String additionalInfo;
	private Date dateSold;
	private Date createDate;
	private Location location;
	private List<LoanApplication> loanApplications = new ArrayList<LoanApplication>(
			0);
	private List<Advertisement> advertisements = new ArrayList<Advertisement>(0);
	private List<Image> images = new ArrayList<Image>(0);
	private List<Inquiry> inquiries = new ArrayList<Inquiry>(0);
	private List<Feature> features = new ArrayList<Feature>(0);
	private List<Category> categories = new ArrayList<Category>(0);

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "VEHICLE_ID", unique = true, nullable = false)
	public Integer getVehicleId() {
		return this.vehicleId;
	}

	public void setVehicleId(Integer vehicleId) {
		this.vehicleId = vehicleId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "STYLE_ID")
	public Style getStyle() {
		return this.style;
	}

	public void setStyle(Style style) {
		this.style = style;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MAKE_ID", nullable = false)
	public Make getMake() {
		return this.make;
	}

	public void setMake(Make make) {
		this.make = make;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MODEL_ID", nullable = false)
	public Model getModel() {
		return this.model;
	}

	public void setModel(Model model) {
		this.model = model;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CREATED_BY", nullable = false)
	public UserInfo getUserInfo() {
		return this.userInfo;
	}

	public void setUserInfo(UserInfo userInfo) {
		this.userInfo = userInfo;
	}

	@Column(name = "STOCK_NBR", length = 60)
	public String getStockNbr() {
		return this.stockNbr;
	}

	public void setStockNbr(String stockNbr) {
		this.stockNbr = stockNbr;
	}
	
	@Column(name = "DESCRIPTION", length = 250)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "YEAR", nullable = false)
	public int getYear() {
		return this.year;
	}

	public void setYear(int year) {
		this.year = year;
	}

	@Column(name = "ENGINE", length = 60)
	public String getEngine() {
		return this.engine;
	}

	public void setEngine(String engine) {
		this.engine = engine;
	}

	@Column(name = "TRANS_TYPE")
	public Integer getTransType() {
		return this.transType;
	}

	public void setTransType(Integer transType) {
		this.transType = transType;
	}

	@Column(name = "DRV_TRN_TYPE")
	public Integer getDrvTrnType() {
		return this.drvTrnType;
	}

	public void setDrvTrnType(Integer drvTrnType) {
		this.drvTrnType = drvTrnType;
	}

	@Column(name = "FUEL_TYPE")
	public Integer getFuelType() {
		return this.fuelType;
	}

	public void setFuelType(Integer fuelType) {
		this.fuelType = fuelType;
	}

	@Column(name = "VIN", length = 60)
	public String getVin() {
		return this.vin;
	}

	public void setVin(String vin) {
		this.vin = vin;
	}

	@Column(name = "MILEAGE")
	public Integer getMileage() {
		return this.mileage;
	}

	public void setMileage(Integer mileage) {
		this.mileage = mileage;
	}

	@Column(name = "DEALER_PRICE", nullable = false, precision = 8)
	public BigDecimal getDealerPrice() {
		return this.dealerPrice;
	}

	public void setDealerPrice(BigDecimal dealerPrice) {
		this.dealerPrice = dealerPrice;
	}

	@Column(name = "SALE_PRICE", nullable = false, precision = 8)
	public BigDecimal getSalePrice() {
		return this.salePrice;
	}

	public void setSalePrice(BigDecimal salePrice) {
		this.salePrice = salePrice;
	}

	@Column(name = "SPECIAL_PRICE", precision = 8)
	public BigDecimal getSpecialPrice() {
		return this.specialPrice;
	}

	public void setSpecialPrice(BigDecimal specialPrice) {
		this.specialPrice = specialPrice;
	}

	@Column(name = "COLOR_EXT", length = 60)
	public String getColorExt() {
		return this.colorExt;
	}

	public void setColorExt(String colorExt) {
		this.colorExt = colorExt;
	}

	@Column(name = "COLOR_INT", length = 60)
	public String getColorInt() {
		return this.colorInt;
	}

	public void setColorInt(String colorInt) {
		this.colorInt = colorInt;
	}

	@Column(name = "WARRANTY_TYPE")
	public Integer getWarrantyType() {
		return this.warrantyType;
	}

	public void setWarrantyType(Integer warrantyType) {
		this.warrantyType = warrantyType;
	}

	@Column(name = "WARRANTY_TERM")
	public Integer getWarrantyTerm() {
		return this.warrantyTerm;
	}

	public void setWarrantyTerm(Integer warrantyTerm) {
		this.warrantyTerm = warrantyTerm;
	}

	@Column(name = "WARRANTY_MILES")
	public Integer getWarrantyMiles() {
		return this.warrantyMiles;
	}

	public void setWarrantyMiles(Integer warrantyMiles) {
		this.warrantyMiles = warrantyMiles;
	}

	@Column(name = "STATUS", nullable = false)
	public int getStatus() {
		return this.status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	@Column(name = "VEH_CONDITION", nullable = false)
	public int getVehCondition() {
		return this.vehCondition;
	}

	public void setVehCondition(int vehCondition) {
		this.vehCondition = vehCondition;
	}

	@Column(name = "CARFAX_APPRV_URL", length = 200)
	public String getCarfaxApprvUrl() {
		return this.carfaxApprvUrl;
	}

	public void setCarfaxApprvUrl(String carfaxApprvUrl) {
		this.carfaxApprvUrl = carfaxApprvUrl;
	}

	@Column(name = "ADDITIONAL_INFO", length = 1000)
	public String getAdditionalInfo() {
		return this.additionalInfo;
	}

	public void setAdditionalInfo(String additionalInfo) {
		this.additionalInfo = additionalInfo;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "DATE_SOLD", length = 10)
	public Date getDateSold() {
		return this.dateSold;
	}

	public void setDateSold(Date dateSold) {
		this.dateSold = dateSold;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "LOCATION_ID", nullable = false)
	public Location getLocation() {
		return this.location;
	}

	public void setLocation(Location location) {
		this.location = location;
	}
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_DATE", nullable = false, length = 19)
	public Date getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "vehicle")
	public List<LoanApplication> getLoanApplications() {
		return this.loanApplications;
	}

	public void setLoanApplications(List<LoanApplication> loanApplications) {
		this.loanApplications = loanApplications;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "vehicle", cascade = {CascadeType.ALL})
	public List<Advertisement> getAdvertisements() {
		return this.advertisements;
	}

	public void setAdvertisements(List<Advertisement> advertisements) {
		this.advertisements = advertisements;
	}

	@OneToMany(fetch = FetchType.EAGER, mappedBy = "vehicle", cascade = {CascadeType.ALL})
	public List<Image> getImages() {
		return this.images;
	}

	public void setImages(List<Image> images) {
		this.images = images;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "vehicle")
	public List<Inquiry> getInquiries() {
		return this.inquiries;
	}

	public void setInquiries(List<Inquiry> inquiries) {
		this.inquiries = inquiries;
	}

	@ManyToMany(fetch = FetchType.LAZY)
	@JoinTable(name = "RL_VEHICLE_FEATURE", joinColumns = { @JoinColumn(name = "VEHICLE_ID", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "FEATURE_ID", nullable = false, updatable = false) })
	public List<Feature> getFeatures() {
		return this.features;
	}

	public void setFeatures(List<Feature> features) {
		this.features = features;
	}

	@ManyToMany(fetch = FetchType.LAZY)
	@JoinTable(name = "RL_VEHICLE_CATEGORY", joinColumns = { @JoinColumn(name = "VEHICLE_ID", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "CATEGORY_ID", nullable = false, updatable = false) })
	public List<Category> getCategories() {
		return this.categories;
	}

	public void setCategories(List<Category> categories) {
		this.categories = categories;
	}

}
